package testInterview;

import java.util.Scanner;

public class Config {
    public void output(String[][] topic,String[][] answer) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入题目，题目长度为："+topic.length);
        Integer next = input.nextInt();
        while (next != 0) {
            System.out.println("题目：");
            String t = topic[next - 1][0];
            System.out.println(t);
            System.out.println("输入你的答案，输入false结束：");
            String yourAnswer = input.next();
            while (!yourAnswer.equals("false")) {
                yourAnswer = input.next();
            }
            System.out.println("是否需要答案？1需要，0不需要");
            Integer next2 = input.nextInt();
            String a = answer[next - 1][0];
            if (next2 == 1) System.out.println(a);
            System.out.println();
            System.out.println("请输入题目，题目长度为："+topic.length);
            next = input.nextInt();
        }
    }
}
